package com.codermn.day725;

/**
 * @author jxau_scf
 * @date 2021/7/25 - 19:00
 */
public class ThreadTest {
    private static int j;

    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true){
                    j++;
                    System.out.println(Thread.currentThread().getName()+"========="+j);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true){

                    j--;
                    System.out.println(Thread.currentThread().getName()+"========="+j);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {

                    j++;
                    System.out.println(Thread.currentThread().getName()+"========="+j);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {

                    j--;
                    System.out.println(Thread.currentThread().getName()+"========="+j);
                }
            }
        }).start();


    }
}
